home *** CD-ROM | disk | FTP | other *** search
/ C# & Game Programming - A…er's Guide (2nd Edition) / Buono 2nd Ed.iso / Chapter2 / 2.14 / 2.14.cs next >
Text File  |  2004-08-31  |  589b  |  19 lines

  1. /* Hey, you broke my while loop! */
  2. using System;
  3.  
  4. namespace Chapter2 {
  5.     class Class1 {
  6.         static void Main() {
  7.             string Quit = "no";     
  8.                                                                                                      
  9.             while (Quit != "yes") {
  10.                 break;                 // breaks loop
  11.                 Console.Write ("\n Would you like to end this loop? ");     
  12.                 Quit = Console.ReadLine ();
  13.             }     
  14.         
  15.             Console.WriteLine ("Program complete!\n");
  16.         }
  17.     }
  18. }
  19.